package com.mathassistant.client.event.exercise;

import com.google.gwt.event.shared.GwtEvent;
import com.mathassistant.shared.TopicDTO;

public class ExerciseDeletedEvent extends GwtEvent<ExerciseDeletedEventHandler>{
	public static final Type<ExerciseDeletedEventHandler> TYPE = new Type<ExerciseDeletedEventHandler>();
	TopicDTO topic;
	int indexBeginList;
	
	public ExerciseDeletedEvent(TopicDTO topic, int indexBeginList){
		this.topic =  topic;
		this.indexBeginList = indexBeginList;
	}
	
	public TopicDTO getTopic(){
		return topic;
	}
	
	public int getIndexBeginList(){
		return indexBeginList;
	}
	
	@Override
	public Type<ExerciseDeletedEventHandler> getAssociatedType() {
		// TODO Auto-generated method stub
		return TYPE;
	}

	@Override
	protected void dispatch(ExerciseDeletedEventHandler handler) {
		// TODO Auto-generated method stub
		handler.onDeleteExercise(this);
	}

}
